home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / cposvx.z / cposvx
Encoding:
Text File  |  2002-10-03  |  11.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))                                                          CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CPOSVX - use the Cholesky factorization A = U**H*U or A = L*L**H to
  10.      compute the solution to a complex system of linear equations A * X = B,
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE CPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, S, B,
  14.                         LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
  15.  
  16.          CHARACTER      EQUED, FACT, UPLO
  17.  
  18.          INTEGER        INFO, LDA, LDAF, LDB, LDX, N, NRHS
  19.  
  20.          REAL           RCOND
  21.  
  22.          REAL           BERR( * ), FERR( * ), RWORK( * ), S( * )
  23.  
  24.          COMPLEX        A( LDA, * ), AF( LDAF, * ), B( LDB, * ), WORK( * ), X(
  25.                         LDX, * )
  26.  
  27. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  28.      These routines are part of the SCSL Scientific Library and can be loaded
  29.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  30.      directs the linker to use the multi-processor version of the library.
  31.  
  32.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  33.      4 bytes (32 bits). Another version of SCSL is available in which integers
  34.      are 8 bytes (64 bits).  This version allows the user access to larger
  35.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  36.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  37.      only one of the two versions; 4-byte integer and 8-byte integer library
  38.      calls cannot be mixed.
  39.  
  40. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  41.      CPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
  42.      compute the solution to a complex system of linear equations A * X = B,
  43.      where A is an N-by-N Hermitian positive definite matrix and X and B are
  44.      N-by-NRHS matrices.
  45.  
  46.      Error bounds on the solution and a condition estimate are also provided.
  47.  
  48.  
  49. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  50.      The following steps are performed:
  51.  
  52.      1. If FACT = 'E', real scaling factors are computed to equilibrate
  53.         the system:
  54.            diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
  55.         Whether or not the system will be equilibrated depends on the
  56.         scaling of the matrix A, but if equilibration is used, A is
  57.         overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
  58.  
  59.      2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))                                                          CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.         factor the matrix A (after equilibration if FACT = 'E') as
  75.            A = U**H* U,  if UPLO = 'U', or
  76.            A = L * L**H,  if UPLO = 'L',
  77.         where U is an upper triangular matrix and L is a lower triangular
  78.         matrix.
  79.  
  80.      3. If the leading i-by-i principal minor is not positive definite,
  81.         then the routine returns with INFO = i. Otherwise, the factored
  82.         form of A is used to estimate the condition number of the matrix
  83.         A.  If the reciprocal of the condition number is less than machine
  84.         precision, INFO = N+1 is returned as a warning, but the routine
  85.         still goes on to solve for X and compute error bounds as
  86.         described below.
  87.  
  88.      4. The system of equations is solved for X using the factored form
  89.         of A.
  90.  
  91.      5. Iterative refinement is applied to improve the computed solution
  92.         matrix and calculate error bounds and backward error estimates
  93.         for it.
  94.  
  95.      6. If equilibration was used, the matrix X is premultiplied by
  96.         diag(S) so that it solves the original system before
  97.         equilibration.
  98.  
  99.  
  100. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  101.      FACT    (input) CHARACTER*1
  102.              Specifies whether or not the factored form of the matrix A is
  103.              supplied on entry, and if not, whether the matrix A should be
  104.              equilibrated before it is factored.  = 'F':  On entry, AF
  105.              contains the factored form of A.  If EQUED = 'Y', the matrix A
  106.              has been equilibrated with scaling factors given by S.  A and AF
  107.              will not be modified.  = 'N':  The matrix A will be copied to AF
  108.              and factored.
  109.              = 'E':  The matrix A will be equilibrated if necessary, then
  110.              copied to AF and factored.
  111.  
  112.      UPLO    (input) CHARACTER*1
  113.              = 'U':  Upper triangle of A is stored;
  114.              = 'L':  Lower triangle of A is stored.
  115.  
  116.      N       (input) INTEGER
  117.              The number of linear equations, i.e., the order of the matrix A.
  118.              N >= 0.
  119.  
  120.      NRHS    (input) INTEGER
  121.              The number of right hand sides, i.e., the number of columns of
  122.              the matrices B and X.  NRHS >= 0.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))                                                          CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      A       (input/output) COMPLEX array, dimension (LDA,N)
  141.              On entry, the Hermitian matrix A, except if FACT = 'F' and EQUED
  142.              = 'Y', then A must contain the equilibrated matrix
  143.              diag(S)*A*diag(S).  If UPLO = 'U', the leading N-by-N upper
  144.              triangular part of A contains the upper triangular part of the
  145.              matrix A, and the strictly lower triangular part of A is not
  146.              referenced.  If UPLO = 'L', the leading N-by-N lower triangular
  147.              part of A contains the lower triangular part of the matrix A, and
  148.              the strictly upper triangular part of A is not referenced.  A is
  149.              not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
  150.              'N' on exit.
  151.  
  152.              On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
  153.              diag(S)*A*diag(S).
  154.  
  155.      LDA     (input) INTEGER
  156.              The leading dimension of the array A.  LDA >= max(1,N).
  157.  
  158.      AF      (input or output) COMPLEX array, dimension (LDAF,N)
  159.              If FACT = 'F', then AF is an input argument and on entry contains
  160.              the triangular factor U or L from the Cholesky factorization A =
  161.              U**H*U or A = L*L**H, in the same storage format as A.  If EQUED
  162.              .ne. 'N', then AF is the factored form of the equilibrated matrix
  163.              diag(S)*A*diag(S).
  164.  
  165.              If FACT = 'N', then AF is an output argument and on exit returns
  166.              the triangular factor U or L from the Cholesky factorization A =
  167.              U**H*U or A = L*L**H of the original matrix A.
  168.  
  169.              If FACT = 'E', then AF is an output argument and on exit returns
  170.              the triangular factor U or L from the Cholesky factorization A =
  171.              U**H*U or A = L*L**H of the equilibrated matrix A (see the
  172.              description of A for the form of the equilibrated matrix).
  173.  
  174.      LDAF    (input) INTEGER
  175.              The leading dimension of the array AF.  LDAF >= max(1,N).
  176.  
  177.      EQUED   (input or output) CHARACTER*1
  178.              Specifies the form of equilibration that was done.  = 'N':  No
  179.              equilibration (always true if FACT = 'N').
  180.              = 'Y':  Equilibration was done, i.e., A has been replaced by
  181.              diag(S) * A * diag(S).  EQUED is an input argument if FACT = 'F';
  182.              otherwise, it is an output argument.
  183.  
  184.      S       (input or output) REAL array, dimension (N)
  185.              The scale factors for A; not accessed if EQUED = 'N'.  S is an
  186.              input argument if FACT = 'F'; otherwise, S is an output argument.
  187.              If FACT = 'F' and EQUED = 'Y', each element of S must be
  188.              positive.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))                                                          CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      B       (input/output) COMPLEX array, dimension (LDB,NRHS)
  207.              On entry, the N-by-NRHS righthand side matrix B.  On exit, if
  208.              EQUED = 'N', B is not modified; if EQUED = 'Y', B is overwritten
  209.              by diag(S) * B.
  210.  
  211.      LDB     (input) INTEGER
  212.              The leading dimension of the array B.  LDB >= max(1,N).
  213.  
  214.      X       (output) COMPLEX array, dimension (LDX,NRHS)
  215.              If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to the
  216.              original system of equations.  Note that if EQUED = 'Y', A and B
  217.              are modified on exit, and the solution to the equilibrated system
  218.              is inv(diag(S))*X.
  219.  
  220.      LDX     (input) INTEGER
  221.              The leading dimension of the array X.  LDX >= max(1,N).
  222.  
  223.      RCOND   (output) REAL
  224.              The estimate of the reciprocal condition number of the matrix A
  225.              after equilibration (if done).  If RCOND is less than the machine
  226.              precision (in particular, if RCOND = 0), the matrix is singular
  227.              to working precision.  This condition is indicated by a return
  228.              code of INFO > 0.
  229.  
  230.      FERR    (output) REAL array, dimension (NRHS)
  231.              The estimated forward error bound for each solution vector X(j)
  232.              (the j-th column of the solution matrix X).  If XTRUE is the true
  233.              solution corresponding to X(j), FERR(j) is an estimated upper
  234.              bound for the magnitude of the largest element in (X(j) - XTRUE)
  235.              divided by the magnitude of the largest element in X(j).  The
  236.              estimate is as reliable as the estimate for RCOND, and is almost
  237.              always a slight overestimate of the true error.
  238.  
  239.      BERR    (output) REAL array, dimension (NRHS)
  240.              The componentwise relative backward error of each solution vector
  241.              X(j) (i.e., the smallest relative change in any element of A or B
  242.              that makes X(j) an exact solution).
  243.  
  244.      WORK    (workspace) COMPLEX array, dimension (2*N)
  245.  
  246.      RWORK   (workspace) REAL array, dimension (N)
  247.  
  248.      INFO    (output) INTEGER
  249.              = 0: successful exit
  250.              < 0: if INFO = -i, the i-th argument had an illegal value
  251.              > 0: if INFO = i, and i is
  252.              <= N:  the leading minor of order i of A is not positive
  253.              definite, so the factorization could not be completed, and the
  254.              solution has not been computed. RCOND = 0 is returned.  = N+1: U
  255.              is nonsingular, but RCOND is less than machine precision, meaning
  256.              that the matrix is singular to working precision.  Nevertheless,
  257.              the solution and error bounds are computed because there are a
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))                                                          CCCCPPPPOOOOSSSSVVVVXXXX((((3333SSSS))))
  269.  
  270.  
  271.  
  272.              number of situations where the computed solution can be more
  273.              accurate than the value of RCOND would suggest.
  274.  
  275. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  276.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  277.  
  278.      This man page is available only online.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.